<template>
  <div>
    {{ props.paramB }}
    <button @click="emitB">给B组件发送事件</button>
  </div>
</template>

<script setup lang=ts>
import Bus from "@/Bus"
/* const emit = defineEmits(["on-click-b"])
const emitB = ()=>{
  emit("on-click-b","A组件参数")
}  */ 

const emitB = ()=>{
  Bus.emit("on-click-b","A参数")
}
const props = defineProps(["paramB"])

</script>

<style scoped>
</style>